The present invention relates to a register circuit for temporarily storing data, and, more particularly, to a register circuit provided in a microcontroller such as a microcomputer and a DMA (Direct Memory Access) controller.
A register circuit is widely used in microcontrollers as a storage circuit for storing operand data, status information, or control information. Each bit of the register circuit has the same constitution as the memory cell of an SRAM, (Static Random Access Memory) and thus has a flip-flop for retaining information and a transfer gate coupled between the input/output terminal of the flip-flop and a data input/output lines and made conductive by a selection signal. When the selection signal goes to an active level, the transfer gate connects the input/output terminal of the flip-flop to the data input/output line. In a data write operation, the data input/output line is driven in response to data to be written. The flip-flop thus stores the data. On the other hand, in a data read operation, the voltage level appearing on the input/output line in response to the data stored in the flip-flop is detected to obtain the data.
The register circuit employed in a microcontroller has relatively small storage capacity in general and is thus constituted of a limited number of registers. For this reason, a certain register or registers are used in common for various kinds of task processing operation. In general old data stored in such a register are allowed to be destroyed in accordance with the change in task operation to be processed. However, such old data often is required to be maintained for resuming the previous task operation. In such a case, in response to the changeover of the task operation, the data used in the previous processing task operation have to be saved in another register.
Considering a control register, it is required to store the contents of a certain register into the control register as new control information for a new operation mode in order to change an operation mode or status. For that purpose, the data in question are first read out of the corresponding register and then written into a target register. In other words, a data read cycle and a data write cycle have to be initiated. In order to execute such a cycle, which is called a bus cycle in a microcontroller, several clock periods are required. That is, against the demand in recent years for the reduction of even one clock time in the operation of the microcontroller, there are required several clock periods for a simple saving or transfer of data.